$(function(){
	
	var $btnAdd = $('#btnAdd');
	$btnAdd.click(function(){
		keywordsAdd();
	});
	
});

function keywordsAdd(){

	var $plantform_id=$('#plantform_id');
	var $url 		= $('#url');
	var $title 		= $('#title');
	var $keywords 	= $('#keywords');
    var $description= $('#description');
    var $remark= $('#remark');
    var $sort= $('#sort');

	var plantform_id= $plantform_id.val();
	var url 		= $url.val();
	var title 		= $title.val();
	var keywords 	= $keywords.val();
	var description = $description.val();
    var remark      = $remark.val();
    var sort        = $sort.val();

	var params = {	
		'plantform_id':plantform_id,
		'url':url,
		'title':title,
		'keywords':keywords,
		'description':description,
        'remark':remark,
        'sort':sort
	}

	$.post('/index.php/Admin/Keywords/add_do',params,function(data){
		if(data.success){
			alert('下单URL添加成功');
			location.reload(true);
		}else{
			alert(data.message);
		}
	},'json');
}